package ddd.leave.domain.person.repository.po;

import java.util.Date;

import ddd.leave.domain.person.entity.valueobject.PersonStatus;
import ddd.leave.domain.person.entity.valueobject.PersonType;
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import jakarta.persistence.Id;
import jakarta.persistence.OneToOne;
import jakarta.persistence.Table;
import jakarta.persistence.Transient;
import lombok.Data;

@Data
@Entity
@Table(name = "person")
public class PersonPO {

	@Id
	String personId;
	String personName;
	String departmentId;
	@Enumerated(EnumType.STRING)
	PersonType personType;
	@Transient
	String leaderId;
	int roleLevel;
	Date createTime;
	Date lastModifyTime;
	@Enumerated(EnumType.STRING)
	PersonStatus status;
	@OneToOne
	RelationshipPO relationshipPO;
}
